﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CatAndDog
{
    class Cat
    {
        private string name = string.Empty;
        private int shoutnum = 3;

        public int ShoutNum
        {
            set {
                shoutnum = value;
            }
            get {
                return shoutnum;
            }
        }

        public Cat()
        {
            this.name = "无名";
        }

        public Cat(string name)
        {
            this.name = name;
        }

        public void Shout()
        {
            string s = "我的名字叫 " + name;
            for (int i = 0; i < shoutnum; i++)
                s += " 喵";

            MessageBox.Show(s);
        }
    }
}
